Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Make MultiSigGeneric define virtual emit{EVENT_NAME} functions from which events get emitted #252

Merged
merged 9 commits into from
Aug 2, 2023

Conversation

0xNeshi
Copy link
Contributor

@0xNeshi 0xNeshi commented Aug 1, 2023

Closes #251

Instructions on making this work

  • run yarn or yarn install to install npm dependencies

@0xNeshi 0xNeshi added the enhancement New feature or request label Aug 1, 2023
@0xNeshi 0xNeshi self-assigned this Aug 1, 2023
@0xNeshi 0xNeshi changed the title Ms event funcs Make MultiSigGeneric define virtual emit{EVENT_NAME} functions from which events get emitted Aug 1, 2023
@@ -29,11 +29,6 @@ contract EndowmentMultiSigEmitter is IEndowmentMultiSigEmitter, Initializable {
);
event TransactionConfirmed(uint256 endowmentId, address owner, uint256 transactionId);
event TransactionConfirmationRevoked(uint256 endowmentId, address owner, uint256 transactionId);
event TransactionConfirmationOfFormerOwnerRevoked(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the same as TransactionConfirmationRevoked above and is unused in Subgraph

@@ -62,11 +62,6 @@ contract CharityApplications is MultiSigGeneric, StorageApplications, ICharityAp
_;
}

// @dev overrides the generic multisig initializer and restricted function
function initialize(address[] memory, uint256, bool, uint256) public override initializer {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By making MultiSigGeneric.initialize internal and non-virtual, we make it possible to remove this "not implemented funcs" there were cluttering the contract code only to avoid a compiler error.
Every child of MultiSigGeneric must now implement its own initializer and optionally call super.initialize.

/// @param _approvalsRequired Number of required confirmations.
/// @param _requireExecution setting for if an explicit execution call is required
/// @param _transactionExpiry Proposal expiry time in seconds
function initialize(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved it down to "internal functions" section

Copy link
Contributor

@stevieraykatz stevieraykatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done. I appreciate the initializer cleanup as well

@stevieraykatz stevieraykatz merged commit d540f78 into master Aug 2, 2023
1 check passed
@stevieraykatz stevieraykatz deleted the ms-event-funcs branch August 2, 2023 00:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Make MultiSigGeneric define virtual emit{EVENT_NAME} functions from which events get emitted
2 participants